3.14.14 \(\int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx\) [1314]

3.14.14.1 Optimal result
3.14.14.2 Mathematica [A] (verified)
3.14.14.3 Rubi [A] (verified)
3.14.14.4 Maple [A] (verified)
3.14.14.5 Fricas [A] (verification not implemented)
3.14.14.6 Sympy [F(-1)]
3.14.14.7 Maxima [A] (verification not implemented)
3.14.14.8 Giac [A] (verification not implemented)
3.14.14.9 Mupad [B] (verification not implemented)

3.14.14.1 Optimal result

Integrand size = 29, antiderivative size = 96 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\csc (c+d x)}{a d}-\frac {b \log (\sin (c+d x))}{a^2 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^2 b^3 d}-\frac {a \sin (c+d x)}{b^2 d}+\frac {\sin ^2(c+d x)}{2 b d} \]

output
-csc(d*x+c)/a/d-b*ln(sin(d*x+c))/a^2/d+(a^2-b^2)^2*ln(a+b*sin(d*x+c))/a^2/ 
b^3/d-a*sin(d*x+c)/b^2/d+1/2*sin(d*x+c)^2/b/d
 
3.14.14.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.90 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {-\frac {2 \csc (c+d x)}{a}-\frac {2 b \log (\sin (c+d x))}{a^2}+\frac {2 \left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^2 b^3}-\frac {2 a \sin (c+d x)}{b^2}+\frac {\sin ^2(c+d x)}{b}}{2 d} \]

input
Integrate[(Cos[c + d*x]^3*Cot[c + d*x]^2)/(a + b*Sin[c + d*x]),x]
 
output
((-2*Csc[c + d*x])/a - (2*b*Log[Sin[c + d*x]])/a^2 + (2*(a^2 - b^2)^2*Log[ 
a + b*Sin[c + d*x]])/(a^2*b^3) - (2*a*Sin[c + d*x])/b^2 + Sin[c + d*x]^2/b 
)/(2*d)
 
3.14.14.3 Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.94, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5}{\sin (c+d x)^2 (a+b \sin (c+d x))}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \frac {\csc ^2(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{a+b \sin (c+d x)}d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\csc ^2(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^2 (a+b \sin (c+d x))}d(b \sin (c+d x))}{b^3 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (-\frac {\csc (c+d x) b^3}{a^2}+\frac {\csc ^2(c+d x) b^2}{a}+\sin (c+d x) b-a+\frac {\left (a^2-b^2\right )^2}{a^2 (a+b \sin (c+d x))}\right )d(b \sin (c+d x))}{b^3 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {b^4 \log (b \sin (c+d x))}{a^2}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^2}-\frac {b^3 \csc (c+d x)}{a}-a b \sin (c+d x)+\frac {1}{2} b^2 \sin ^2(c+d x)}{b^3 d}\)

input
Int[(Cos[c + d*x]^3*Cot[c + d*x]^2)/(a + b*Sin[c + d*x]),x]
 
output
(-((b^3*Csc[c + d*x])/a) - (b^4*Log[b*Sin[c + d*x]])/a^2 + ((a^2 - b^2)^2* 
Log[a + b*Sin[c + d*x]])/a^2 - a*b*Sin[c + d*x] + (b^2*Sin[c + d*x]^2)/2)/ 
(b^3*d)
 

3.14.14.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.14.14.4 Maple [A] (verified)

Time = 0.59 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {-\frac {-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{b^{2}}-\frac {1}{a \sin \left (d x +c \right )}-\frac {b \ln \left (\sin \left (d x +c \right )\right )}{a^{2}}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{3} a^{2}}}{d}\) \(90\)
default \(\frac {-\frac {-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{b^{2}}-\frac {1}{a \sin \left (d x +c \right )}-\frac {b \ln \left (\sin \left (d x +c \right )\right )}{a^{2}}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{3} a^{2}}}{d}\) \(90\)
parallelrisch \(\frac {4 \left (a -b \right )^{2} \left (a +b \right )^{2} \ln \left (2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )+\left (-4 a^{4}+8 a^{2} b^{2}\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{4}-2 a \,b^{3} \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \csc \left (\frac {d x}{2}+\frac {c}{2}\right )-4 b \left (a \sin \left (d x +c \right )+\frac {b \cos \left (2 d x +2 c \right )}{4}-\frac {b}{4}\right ) a^{2}}{4 a^{2} b^{3} d}\) \(150\)
risch \(-\frac {i a^{2} x}{b^{3}}+\frac {2 i x}{b}-\frac {{\mathrm e}^{2 i \left (d x +c \right )}}{8 b d}+\frac {i a \,{\mathrm e}^{i \left (d x +c \right )}}{2 b^{2} d}-\frac {i a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 b^{2} d}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )}}{8 b d}-\frac {2 i a^{2} c}{b^{3} d}+\frac {4 i c}{b d}-\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b^{3} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b d}+\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{2} d}\) \(276\)
norman \(\frac {\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}+\frac {2 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}-\frac {1}{2 a d}-\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}-\frac {2 \left (a^{2}+b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,b^{2} d}-\frac {2 \left (a^{2}+b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,b^{2} d}-\frac {\left (4 a^{2}+3 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a \,b^{2} d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a^{2} b^{3} d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2} d}-\frac {\left (a^{2}-2 b^{2}\right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3} d}\) \(289\)

input
int(cos(d*x+c)^5*csc(d*x+c)^2/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(-1/b^2*(-1/2*sin(d*x+c)^2*b+a*sin(d*x+c))-1/a/sin(d*x+c)-1/a^2*b*ln(s 
in(d*x+c))+1/b^3*(a^4-2*a^2*b^2+b^4)/a^2*ln(a+b*sin(d*x+c)))
 
3.14.14.5 Fricas [A] (verification not implemented)

Time = 0.43 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.39 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {4 \, a^{3} b \cos \left (d x + c\right )^{2} - 4 \, b^{4} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - 4 \, a^{3} b - 4 \, a b^{3} + 4 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) \sin \left (d x + c\right ) - {\left (2 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} - a^{2} b^{2}\right )} \sin \left (d x + c\right )}{4 \, a^{2} b^{3} d \sin \left (d x + c\right )} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="fricas" 
)
 
output
1/4*(4*a^3*b*cos(d*x + c)^2 - 4*b^4*log(1/2*sin(d*x + c))*sin(d*x + c) - 4 
*a^3*b - 4*a*b^3 + 4*(a^4 - 2*a^2*b^2 + b^4)*log(b*sin(d*x + c) + a)*sin(d 
*x + c) - (2*a^2*b^2*cos(d*x + c)^2 - a^2*b^2)*sin(d*x + c))/(a^2*b^3*d*si 
n(d*x + c))
 
3.14.14.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**5*csc(d*x+c)**2/(a+b*sin(d*x+c)),x)
 
output
Timed out
 
3.14.14.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.95 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\frac {2 \, b \log \left (\sin \left (d x + c\right )\right )}{a^{2}} - \frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}} + \frac {2}{a \sin \left (d x + c\right )} - \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{2} b^{3}}}{2 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="maxima" 
)
 
output
-1/2*(2*b*log(sin(d*x + c))/a^2 - (b*sin(d*x + c)^2 - 2*a*sin(d*x + c))/b^ 
2 + 2/(a*sin(d*x + c)) - 2*(a^4 - 2*a^2*b^2 + b^4)*log(b*sin(d*x + c) + a) 
/(a^2*b^3))/d
 
3.14.14.8 Giac [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.09 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {\frac {2 \, b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{2}} - \frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}} - \frac {2 \, {\left (b \sin \left (d x + c\right ) - a\right )}}{a^{2} \sin \left (d x + c\right )} - \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{2} b^{3}}}{2 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="giac")
 
output
-1/2*(2*b*log(abs(sin(d*x + c)))/a^2 - (b*sin(d*x + c)^2 - 2*a*sin(d*x + c 
))/b^2 - 2*(b*sin(d*x + c) - a)/(a^2*sin(d*x + c)) - 2*(a^4 - 2*a^2*b^2 + 
b^4)*log(abs(b*sin(d*x + c) + a))/(a^2*b^3))/d
 
3.14.14.9 Mupad [B] (verification not implemented)

Time = 11.85 (sec) , antiderivative size = 233, normalized size of antiderivative = 2.43 \[ \int \frac {\cos ^3(c+d x) \cot ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,{\left (a^2-b^2\right )}^2}{a^2\,b^3\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2-2\,b^2\right )}{b^3\,d}-\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2+b^2\right )}{b^2}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,a^2+b^2\right )}{b^2}-\frac {4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{b}+1}{d\,\left (2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \]

input
int(cos(c + d*x)^5/(sin(c + d*x)^2*(a + b*sin(c + d*x))),x)
 
output
(log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)*(a^2 - b^2)^2)/( 
a^2*b^3*d) - tan(c/2 + (d*x)/2)/(2*a*d) - (log(tan(c/2 + (d*x)/2)^2 + 1)*( 
a^2 - 2*b^2))/(b^3*d) - (b*log(tan(c/2 + (d*x)/2)))/(a^2*d) - ((2*tan(c/2 
+ (d*x)/2)^2*(2*a^2 + b^2))/b^2 + (tan(c/2 + (d*x)/2)^4*(4*a^2 + b^2))/b^2 
 - (4*a*tan(c/2 + (d*x)/2)^3)/b + 1)/(d*(2*a*tan(c/2 + (d*x)/2) + 4*a*tan( 
c/2 + (d*x)/2)^3 + 2*a*tan(c/2 + (d*x)/2)^5))